<#assign subTitle = "用户注册">
<#assign scripts = "<script type=\"text/javascript\" src=\"/static/js/Validform_min.js\"></script>">
<#assign styles = "<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/css/validation.css?v=0.0.1\" />">
<#include "header.ftl">
<script>
$(document).ready(function() {
	$("#regForm").Validform({
		btnSubmit:"#btn_sub",
		tiptype:function(msg,o,cssctl){
			if(o.obj){
					var objtip=o.obj.parent().parent().find(".Validform_checktip");
					cssctl(objtip,o.type);
					objtip.text(msg);
				}
		},
		tipSweep:false,
		postonce:true
	});

	$("#captcha_refresh,#captcha_img").click(function(){
		var o = $("#captcha_img");
		var ts = new Date().getTime();
		var src = o.attr("src");
		src = src.substr(0,src.indexOf("ts"));
		src += "ts="+ts;
		o.attr("src",src);
	});
});
</script>

<body>

  <div id="header" class="wraper">
  </div>
   <div id="bodier" class="wraper">
	<form id="regForm" action="/account/signup.do" method="post">
		<div class="aline">
			<label>邮 箱：</label>
			<div>
				<input type="text" name="name" value='${name!""}' ajaxurl="/account/asnynamecheck.do" datatype="e" nullmsg="请输入邮箱地址！" errormsg="请输入邮箱地址！"/>
			</div>
		<#if (errors.name)??>
			<div class="Validform_checktip Validform_wrong">
				 <#list errors.name as err>
					${err}
				  </#list>
			</div>
		<#else> <div class="Validform_checktip">请输入常用的邮箱地址</div></#if>
		</div>
		<div class="aline">
			<label>密  码：</label>
			<div>
				<input type="password" name="password" datatype="s6-20" nullmsg="请设置密码！" errormsg="密码范围在6~20位之间，不能使用空格！"/>
			</div>
		<#if (errors.password)??>
			<div class="Validform_checktip Validform_wrong">
				 <#list errors.password as err>
					${err}
				  </#list>
			</div>
		<#else> <div class="Validform_checktip">密码范围在6~20位之间，不能使用空格</div></#if>		
		</div>
		<div class="aline">
			<label>确认密码：</label>
			<div>
				<input type="password" name="confirmPassword" datatype="*" recheck="password" errormsg="您两次输入的账号密码不一致！"/>
			</div>
		<#if (errors.confirmPassword)??>
			<div class="Validform_checktip Validform_wrong">
				 <#list errors.confirmPassword as err>
					${err}
				  </#list>
			</div>
		<#else> <div class="Validform_checktip">两次输入密码须一致</div></#if>
		</div>
		<div class="aline">
			<label>昵  称：</label>
			<div>
				<input type="text" name="displayName" value='${displayName!""}' datatype="s1-16" nullmsg="请输入昵称！" errormsg="昵称最多12个字符！"/>
			</div>
		<#if (errors.displayName)??>
			<div class="Validform_checktip Validform_wrong">
				 <#list errors.displayName as err>
					${err}
				  </#list>
			</div>
		<#else> <div class="Validform_checktip">昵称最多12个字符</div></#if>
		</div>
		<div class="aline">	
			<label>验证码：</label>
			<div>
				<input type="text" name="captcha" datatype="s4-10" nullmsg="请输入验证码！" errormsg="请输入验证码（4-10个字符）！"/>
			<#if (errors.captcha)??>
				<div class="Validform_checktip Validform_wrong">
					 <#list errors.captcha as err>
						${err}
					  </#list>
				</div>
			<#else> <div class="Validform_checktip"></div></#if>				
				<div>
				<img id="captcha_img" width="150px" height="60px" src="/captcha.jpg?token=5002428870829195531&ts=0" style="border:1px solid #ddd">
				<a id="captcha_refresh" href="#" title="看不清左边的字符">看不清？</a>
				</div>
			</div>
		</div>
		<div class="aline"> 
			<input type="checkbox" name="check" checked="checked" datatype="checkbox"  errormsg="请先阅读并同意搜车客服务条款！"/>
			同意“<a href="aggrement.html">服务条款</a>”和“<a href="aggrement.html">隐私权保护和个人信息利用政策</a>” 
			<div class="Validform_checktip"></div>
		</div>
		<div class="aline">
			<input id="btn_sub" name="_finish" type="submit" value="注册"/>
			<input name="token" type="hidden" value="5002428870829195531"/>
		</div>

		<div class="aline">
			已经注册，<a href="/login.html" class="buttonB">登入</a>
		</div>
	</form>
  </div>
   <div id="footer" class="wraper">
  </div>

<#include "footer.ftl">